import { lazy } from 'react';
import Event from "./Event";
import EventDetail from "./Event/detail"

const monitorRouter = [
  {
    path: '/monitor/event',
    name: '请求事件监控',
    des: '',
    component: window.__POWERED_BY_QIANKUN__ ? Event : lazy(() => import('./Event')),
    exact: true,
    auth: true,
  },
  {
    path: '/monitor/event/download',
    name: '批量下载',
    des: '',
    component: lazy(() => import('./Event/Download')),
    exact: true,
    auth: true,
  },
  {
    path: '/monitor/event/:id/detail',
    name: '事件详情',
    des: '',
    component: window.__POWERED_BY_QIANKUN__ ? EventDetail : lazy(() => import('./Event/detail')),
    meta: {
      title: '策略日志',
      activeMenu: '/smp/monitor/event',
    },
  },
  {
    path: '/monitor/device',
    name: '设备采集监控',
    des: '',
    component: lazy(() => import('./Device')),
    exact: true,
    auth: true,
  },
  {
    path: '/monitor/risk',
    name: '风险监控管理',
    des: '',
    component: lazy(() => import('./Risk')),
    exact: true,
    auth: true,
  },
  {
    path: '/monitor/dataReport',
    name: '数据报告管理',
    des: '',
    component: lazy(() => import('./DataReport')),
    exact: true,
    auth: true,
  },
  {
    path: '/monitor/devOps/services',
    name: '服务器性能监控',
    des: '',
    component: lazy(() => import('./DevOps/Services')),
    exact: true,
    auth: true,
  },
  {
    path: '/monitor/devOps/middleware',
    name: '中间件监控',
    des: '',
    component: lazy(() => import('./DevOps/Middleware')),
    exact: true,
    auth: true,
  },
  {
    path: '/monitor/devOps/api',
    name: '接口调用监控',
    des: '',
    component: lazy(() => import('./DevOps/Api')),
    exact: true,
    auth: true,
  },
  {
    path: '/monitor/devOps/appNodes',
    name: '应用节点监控',
    des: '',
    component: lazy(() => import('./DevOps/AppNodes')),
    exact: true,
    auth: true,
  },
  {
    path: '/monitor/devOps/warning',
    name: '监控报警管理',
    des: '',
    component: lazy(() => import('./DevOps/Warning')),
    exact: true,
    auth: true,
  },
  {
    path: '/monitor/devOps/warning/setting',
    name: '监控规则设置',
    des: '',
    component: lazy(() => import('./DevOps/Warning/setting')),
    exact: true,
    auth: true,
  },
];

export default monitorRouter;
